package org.zlex.chapter03;

import javax.crypto.KeyGenerator;
import javax.crypto.SecretKey;
import java.security.NoSuchAlgorithmException;

/**
 * @author : wushikai
 * <p>
 * date : 2021-04-22
 */
public class KeyGeneratorDemo {


    public  static void test ( ) throws NoSuchAlgorithmException {



        KeyGenerator keyGenerator = KeyGenerator.getInstance("HmacMD5");

        SecretKey secretKey = keyGenerator.generateKey();  //生成密钥




    }

    public static void main(String[] args) throws NoSuchAlgorithmException {
      test();
    }


}
